package com.pds.web.testOrganizationInfo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pds.web.testOrganizationInfo.domain.PdsTestOrganizationInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PdsTestOrganizationInfoMapper extends BaseMapper<PdsTestOrganizationInfo> {

    /**
     * 查询 -- 分页/条件：userId，status
     *
     * @param pdsTestOrganizationInfo
     * @return
     */
    List<PdsTestOrganizationInfo> selectInfoList(PdsTestOrganizationInfo pdsTestOrganizationInfo);

    PdsTestOrganizationInfo selectByUserId(Long userId);

    PdsTestOrganizationInfo selectByOrganizationId(Long organizationId);

    /**
     * 删除机构的检测范围
     * @param organizationId 检测机构id
     * @return
     */
    int deleteOrganizationCategoryById(String organizationId);

    /**
     * 保存机构的检测范围
     * @param organizationId 检测机构id
     * @param categoryIds 检测范围id
     * @return
     */
    int addOrganizationCategory(@Param("organizationId") String organizationId,
                                @Param("categoryIds") String categoryIds);
    /**
     * 查询机构检测范围
     * organizationId 机构id
     *
     * @param organizationId
     * @return
     */
    List<String> getOrganizationCategory(String organizationId);

    /**
     * 根据检测因子id查询检测范围
     * @param ids
     * @return
     */
    List<String> getTaskCategory(String ids);
}
